#include "junix.h"
using namespace std;

int main(int argc, char **argv)
{
	srand(time(0));
	vector<int> vi(40);
	generate(vi.begin(), vi.end(),
			boost::bind( modulus<int>(), boost::bind(rand), 40));
	ostream_iterator<int> oit(cout, " ");
    copy(vi.begin(), vi.end(), oit);	
	cout<<endl;

	vector<int> vi2(vi);
	sort(vi2.begin(), vi2.end());
	if( binary_search(vi2.begin(), vi2.end(), 5))
		cout<<"5 in vector"<<endl;
	cout<<endl;

	vector<int> v3;
	v3.push_back(4);
	v3.push_back(5);

	if( includes(vi2.begin(), vi2.end(),
				v3.begin(),v3.end()))
		cout<<"includes"<<endl;
}
